const qcloud = require('./vendor/qcloud-weapp-client-sdk/index.js')
const config = require('./config.js')
//app.js
App({
  onLaunch: function () {
    qcloud.setLoginUrl(config.service.loginUrl);
    // 展示本地存储能力
    
    Date.prototype.format = function (format) {
      var o = {
        "M+": this.getMonth() + 1,
        "d+": this.getDate(),
        "h+": this.getHours(),
        "m+": this.getMinutes(),
        "s+": this.getSeconds(),
        "q+": Math.floor((this.getMonth() + 3) / 3),
        "S": this.getMilliseconds()
      }
      if (/(y+)/.test(format)) {
        format = format.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
      }
      for (var k in o) {
        if (new RegExp("(" + k + ")").test(format)) {
          format = format.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ("00" + o[k]).substr(("" + o[k]).length));
        }
      }
      return format;
    }
  },
  globalData: {
    userInfo: null,
    name:'',
    epId:'',
    limitSecondsChecking:15,
    limitSecondsMultiple:15,
    limitSecondsSingle:15,
    lastResultPaper:'',
    resultQuestionVOsJn:{},
    qualifyingNames: [
      "入门新手", "起步熟手", "坚韧黑铁", "顽强青铜", "傲气白银",
      "聪慧黄金", "巧思白金", "睿智黑金", "无暇砖石", "智者大师",
      "万卷宗师", "博学史诗", "智慧传说", "最强大脑"
    ]
  },

  window:{
    "enablePullDownRefresh": true
  }
})